package com.tencent.wxcloudrun.pojo.dto.req;

import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 创建数据（create）接口  <a href="https://lbs.qq.com/service/placeCloud/placeCloudGuide/cloudDataManage#2">...</a>
 */
@Data
public class DateCreateReq {

    /**
     * 非必填 <br>
     * 表ID，表的唯一标识，缺省则返回所有有权访问的表信息  （table_id在表创建后由系统自动生成，可在地点云数据管理台查询得到）
     */
    private String table_id;

    private List<MapTable> data;

    /**
     * 用户可创建多张地点云数据表，而每张表的具体字段结构定义如下  <br>
     * <a href="https://lbs.qq.com/service/placeCloud/placeCloudGuide/cloudBasic#2">...</a>
     */
    @Data
    public static class MapTable {
        private Integer id;
        private String ud_id;
        private String title;
        private String address;
        private Location location;
        private String polygon;
        private String tel;
        private Integer create_time;
        private Integer update_time;
        private String province;
        private String city;
        private String district;
        private Integer adcode;
        private Integer _distance;
        private Map<String, Object> x;
    }

    /**
     * 坐标
     */
    @Data
    private static class Location {
        /**
         * 纬度
         */
        private Integer lat;

        /**
         * 经度
         */
        private Integer lng;
    }
}
